﻿<%@ Page Title="" Language="C#" MasterPageFile="~/template/Admin.Master" AutoEventWireup="true"
    CodeBehind="CreatePhoto.aspx.cs" Inherits="EmptyWallGallery.FrontEnd.inside.Editor.Products.CreatePhoto" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" language="javascript" src="/Library/handlers.Ori.js"></script>
    <script language="javascript" type="text/javascript">
        var AlbumId = 0;
        var UserName = "";
        var UserId = "";
        $(document).ready(function () {
            Menus.DisplaySubMenu('menu-1-2');
            Menus.ChangeSelectedMenu('menu-1-2');

            AlbumId = <%= AlbumId %>;
            UserName = '<%= UserName %>';
            UserId = '<%= UserId %>';

            $("a[rel=TopProduct]").fancybox({
                'transitionIn': 'none',
                'transitionOut': 'none',
                'titlePosition': 'over',
                'titleFormat': function (title, currentArray, currentIndex, currentOpts) {
                    return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + ' ' + title + '</span>';
                }
            });            
        });
    </script>
    <script language="javascript" type="text/javascript" src="/Library/Preload.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ctphMain" runat="server">
    <div style="float: left; width: 100%;">
        <div id="iconLink" class="icon32">
            <br />
        </div>
        <h2 runat="server" id="headTitle">
            Thêm hình ảnh vào danh mục</h2>
    </div>
    <div class="form-wrap" style="float: left; width: 98%; margin-right: 20px;">
        <div class="frmFilter" style="margin: 0px;">
            <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <th style="line-height: 26px;">
                        Upload ảnh
                    </th>
                </tr>
                <tr>
                    <td style="padding: 10px;">
                        <div id="divMovieContainer">
                            <div class="fl">
                                <span id="spanButtonPlaceHolder"></span>
                            </div>
                            <div id="btnUpload" style="display: none;">
                                <input type="button" value="Tải lên" onclick="swfu.startUpload();" />
                            </div>
                        </div>
                        <div class="fileQueueContent" id="fsUploadProgress"></div>
                    </td>
                </tr>
            </table>
        </div>
        <div style="margin-top: 50px; color: #000;">
            <asp:ListView ID="lstPhoto" runat="server" OnPreRender="LstPhotoPreRender">
                <LayoutTemplate>
                    <table runat="server" id="itemPlaceholderContainer" width="100%">
                        <tr>
                            <td style="border: none;">
                                <div runat="server" id="itemPlaceholder">
                                </div>
                            </td>
                        </tr>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <div class="albumItem">
                        <div style="border: solid 1px #CCC; width: 130px; height: 100px; margin-top: 5px;overflow: hidden;">
                            <%# WriteImage(Eval("ImageUrl").ToString(), Convert.ToDateTime(Eval("ImageDate").ToString()), Eval("UserId").ToString())%>
                        </div>
                        <div style="font-size: 11px; margin-top: 3px; line-height: 16px;">
                            <%# Eval("ViewCount") %>
                            lượt xem - <a href="DeletePhoto.aspx?Id=<%# Eval("ImageID") %>&ReUrl=<%= Server.UrlEncode(Request.RawUrl) %>" onclick="return confirm('Bạn có chắc muốn xóa?')"
                                title="Xóa">Xóa</a>
                            <br />
                            <%# WriteCreateDate(Eval("ImageDate").ToString())%>
                        </div>
                    </div>
                </ItemTemplate>
            </asp:ListView>
            <div class="paging clearfix">
                <asp:DataPager ID="dtPgPhoto" runat="server" PagedControlID="lstPhoto" PageSize="20"
                    QueryStringField="Page">
                    <Fields>
                        <asp:NumericPagerField ButtonType="Link" />
                    </Fields>
                </asp:DataPager>
            </div>
        </div>
    </div>
</asp:Content>
